import Layout from '@/layout/index.vue'

const asyncRoutes = [
  {
    path: '/message',
    name: ' Message',
    component: Layout,
    meta: {
      title: '消息管理',
      icon: 'nav-icon icon-message',
      resourceId: 'route:/web/message-management/',
    },
    children: [
      {
        path: '/message/hycMessageList',
        name: 'HycMessageList',
        component: () => import('@/views/message/hycMessageList.vue'),
        meta: {
          title: '小易消息',
          resourceId: 'route:/web/message-management/hycMessage-management/',
        },
      },
      {
        path: '/message/xyMessageAdd',
        name: 'XyMessageAdd',
        hidden: true,
        component: () => import('@/views/message/messageAdd.vue'),
        meta: {
          title: '新增小易消息',
          activeMenu: '/message',
          resourceId:
            'route:/web/message-management/hycMessage-management/hycMessageCreate-management/',
        },
      },
      {
        path: '/message/xyMessageEdit/:id',
        name: 'XyMessageEdit',
        hidden: true,
        component: () => import('@/views/message/messageAdd.vue'),
        meta: {
          title: '编辑小易消息',
          activeMenu: '/message',
          resourceId:
            'route:/web/message-management/hycMessage-management/hycMessageCreate-management/',
          key: (route) => `${route.params.id}`,
        },
      },
      {
        path: '/message/xyMessageDetail/:id',
        name: 'XyMessageDetail',
        hidden: true,
        component: () => import('@/views/message/messageDetail.vue'),
        meta: {
          title: '小易消息详情',
          activeMenu: '/message',
          resourceId:
            'route:/web/message-management/hycMessage-management/hycMessageDetail-management/',
          key: (route) => `${route.params.id}`,
        },
      },
      // {
      //   path: '/message/gzhMessageList',
      //   name: 'GzhMessageList',
      //   component: () => import('@/views/device/stationAdd.vue'),
      //   meta: {
      //     title: '公众号消息',
      //     resourceId: 'route:/web/message-management/advert/', //todo
      //   },
      // },
    ],
  },
]
export default asyncRoutes
